package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 退款信息
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_user_stroke_order_refund")
public class UserStrokeOrderRefund extends Model<UserStrokeOrderRefund> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "refund_id", type = IdType.ASSIGN_ID)
    private String refundId;
    /**
     * 实际支付金额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;
    /**
     * 退款金额
     */
    @TableField("refund_amount")
    private BigDecimal refundAmount;
    /**
     * 退款时间
     */
    @TableField("refund_time")
    private LocalDateTime refundTime;
    /**
     * 退款状态:1退款成功 2退款失败
     */
    @TableField("refund_status")
    private Integer refundStatus;
    /**
     * 编号:如果有多笔退款的时候从1开始编号
     */
    @TableField("refund_no")
    private Integer refundNo;
    /**
     * 订单ID
     */
    @TableField("order_id")
    private String orderId;
    /**
     * 行程ID
     */
    @TableField("sid")
    private String sid;
    /**
     * 业务ID:对应订单表中的第三方订单号
     */
    @TableField("bid")
    private String bid;

    public void freeData() {
        this.refundId = null;
        this.payAmount = null;
        this.refundAmount = null;
        this.refundTime = null;
        this.refundStatus = null;
        this.refundNo = null;
        this.orderId = null;
        this.sid = null;
        this.bid = null;
    }

}
